package com.alog.yzd.bookmall.domain.catagory;

import java.util.List;

/**
 * 分类模块的实体类
 */
public class Catagory {
    private String cid;     //主键
    private String cname;   //分类名称
    private String desc;    //描述

    private Catagory parent;
    private List<Catagory> childs;

    public Catagory getParent() {
        return parent;
    }

    public void setParent(Catagory parent) {
        this.parent = parent;
    }

    public List<Catagory> getChilds() {
        return childs;
    }

    public void setChilds(List<Catagory> childs) {
        this.childs = childs;
    }

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    public String toString() {
        return "Catagory{" +
                "cid='" + cid + '\'' +
                ", cname='" + cname + '\'' +
                ", desc='" + desc + '\'' +
                ", parent=" + parent.cname +
                ", childs=" + childs.size() +
                '}';
    }
}
